﻿<link rel="stylesheet" href="~app/app.css" />
<!-- needs to be loaded dynamically -->
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script>

    var safeSodLoad = safeSodLoad || function (fn, scriptKey) {
        if (!SP.SOD.executeOrDelayUntilScriptLoaded(fn, scriptKey))
            LoadSodByKey(scriptKey);
    };

    RegisterSod('spdevlab.jsappwebpart.core.js', '~sys/core/1.0.0.0/app.js');
    RegisterSod('spdevlab.gmaps.officemap.demo.js', '~app/app.js');

    safeSodLoad(function () {

        spdevlab.jsappwebpart.loader
							 	.js('~app/app.js', function () {

							 	    var mapContainer = document.getElementById("~js-app-id");
							 	    new officeWorldMapDemo.OfficeMap(mapContainer).init();

							 	});


    }, "spdevlab.jsappwebpart.core.js");

</script>
<div id="~js-app-id" style="width:585px; height:285px"   >
    Map demo
</div>